import 'package:flutter/material.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_bottom.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_explain.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_goods_detail.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_goods_info.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_tab_bar.dart';
import 'package:flutter_buisiness_2006a/pages/detail/detail_top.dart';
import 'package:flutter_buisiness_2006a/provider/category_provider.dart';
import 'package:flutter_buisiness_2006a/provider/detail_info_provider.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';

class DetailPage extends StatelessWidget {
  const DetailPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 750, height: 1334);
    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
          icon: const Icon(Icons.arrow_back),
          onPressed: () {
            Navigator.pop(context); //关闭当前页面
          },
        ),
        title: const Text('商品详情'),
      ),
      body:Stack(
        children: [
          ListView(
            children:[
              const DetailTop(),
              const DetailExplain(),
              const DetailTabBar(),
              const DetailGoodsDetail(),
              DetailGoodsInfo(),
            ],
          ),
          const Positioned(child: DetailBottom(),bottom: 0,left: 0,)
        ],
      ),
    );
  }
}
